package com.ygqh.baby.service;

import com.ygqh.baby.ao.*;
import com.ygqh.baby.model.OrderSkuTaxRates;
import com.ygqh.baby.model.OrderTaxes;
import com.ygqh.baby.model.YgPtSkuInfo;
import com.ygqh.baby.po.YgOrderDetail;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface YgOrderDetailService {

	List<YgOrderDetail> find();

	int findCount();

	YgOrderDetail findById(Long id);

	int save(YgOrderDetail ygOrderDetail);

	int update(YgOrderDetail ygOrderDetail);

	int saveOrUpdate(YgOrderDetail ygOrderDetail);

	ResultSet<YgOrderDetail> search(QueryInfo queryInfo, String q);

	int updateDetailSendBatch(List<YgOrderDetail> detailList);

	List<YgOrderDetail> findAudited(Long orderId);

	List<YgOrderDetail> findByOrderId(Long orderId);

	int addBatch(List<YgOrderDetail> detailList);

	int updateRefundStatusByReturn(Long orderId, RefundStatus refundStatus, List<Long> skuIds);

	int updateRefundStatusByReturn(Long orderId, ReturnType returnType, ReturnStatus returnStatus, Boolean isSend, List<Long> skuIds);

	Message modifyDetail(Long detailId, Long userId, List<YgPtSkuInfo> skuList, String operator);

	int cancelRefundMarkByOids(List<Long> oIds);

	List<Map<String, Object>> exportOrderByProductId(Date startDate,Date endDate,String q, String platformNo);

	Message updateDetailSupplierId(Long[] productIds, Long supplierId);

	List<YgOrderDetail> findByOrderIds(Long[] orderIds);

	int updateRefundStatusById(List<Long> idList, RefundStatus refundStatus);

	List<OrderSkuTaxRates> getOrderSkuTaxRates(Long orderId);
	
	OrderTaxes getOrderTaxes(Long orderId);

	OrderTaxes getOrderTaxes(Long orderId, List<OrderSkuTaxRates> orderSkuTaxRates);

	Boolean existSupplierGoods(Long orderId, Long supplierId);

    int getAlreadyPushWdtTimes(Long orderId);

	List<YgOrderDetail> findDetailsBySupplierId(Long orderId, Long supplierId);

    List<YgOrderDetail> findByOutCode(String outCode);
}
